import { toast } from 'react-toastify';

export const copyToClipboard = async (text: string) => {
  try {
    await navigator.clipboard.writeText(text);
    console.log('Text copied to clipboard');

    toast.success('Text copied to clipboard');
  } catch (err) {
    console.error('Failed to copy text: ', err);
  }
};
